﻿<local:DocumentBase x:Class="WPFExcelReport.JLTWB18TOT"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
        Background="White" 
         Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>        
        <Grid Grid.Row="0" Grid.Column="0">
            <WrapPanel >
                <Label Content="花型号：" Width="64" Margin="5,0,0,0" FontSize="18"/>
                <TextBox Name="txtART" Width="100" Margin="0,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="1"
                         Text="" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18"  Height="33" />
                <Label Content="颜色："    Width="49" Margin="5,0,0,0"   FontSize="18" />
                <TextBox Name="txtCOLOR" Width="50" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="3" FontSize="18" Height="33" />
                <CheckBox IsChecked="False" Background="White" Name="Chk" Height="19" Margin="5,0,0,0" Width="78">英文数据</CheckBox>
                <CheckBox IsChecked="False" Background="White" Name="ChkMTR" Height="19" Width="99">大于20米以上</CheckBox>
                <!--<Label Content="检验日期从" Height="26" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label3" VerticalAlignment="Top" Width="87" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_DN_DATE" VerticalAlignment="Top" Panel.ZIndex="4"
                                    SelectedDateChanged ="FROM_DN_DATE_SelectedDateChanged" Width="101" />
                <Label Content="到" Height="28" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label4" VerticalAlignment="Top" Width="19" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="END_DN_DATE" VerticalAlignment="Top" Panel.ZIndex="5"
                                    SelectedDateChanged ="END_DN_DATE_SelectedDateChanged" Width="101" />-->
                <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="64" Panel.ZIndex="6"
                        Click="btnQuery_Click"/>
                <Button Content="导出" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="65" Panel.ZIndex="7"
                        Click="btnEXCEL_Click"/>
                <Button Content="查询百码" Height="33" Margin="10,0,0,0"  Name="btnQueryPVH" Width="64" Panel.ZIndex="8"
                        Click="btnQueryPVH_Click"/>
                <Button Content="导出百码" Height="33" Margin="10,0,0,0"  Name="btnEXCELPVH" Width="65" Panel.ZIndex="9"
                        Click="btnEXCEL_Click"/>
                <Label Content="单卷：" Width="64" Margin="5,0,0,0" FontSize="18"/>
                <TextBox Name="txtROLL" Width="50" Margin="0,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="10"
                         Text="" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18"  Height="33" />
                <Label Content="整批："    Width="49" Margin="5,0,0,0"   FontSize="18" />
                <TextBox Name="txtBAT" Width="50" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="11"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="3" FontSize="18" Height="33" />
                <Button Content="保存" Height="33" Margin="10,0,0,0"  Name="btnSave" Width="64" Panel.ZIndex="12"
                        Click="btnSave_Click"/>
            </WrapPanel>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="0" Name="gMasterDg">
            <DataGrid CanUserReorderColumns="True"  
                  CanUserResizeRows="True" CanUserSortColumns="True"
                  AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  FontSize="14"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10"
                               ItemsSource="{Binding}" x:Name="MasterDg"  IsReadOnly="True"
                               Margin="0,0,0,0">
                <!--VKPART	VKPFARBE	VKPMEEH	RATE	KDART	DES	MTR	YARD	ROLLNUM	QTY	BQTY	BROLLNUM	AVGRATE	
                 MINRATE	MAXRATE	ROLLNUM1	ROLLQTY1	ROLLNUM2	ROLLQTY2	ROLLNUM3	ROLLQTY3	
                    ROLLNUM4	ROLLQTY4	ROLLNUM5	ROLLQTY5 -->
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="花型号" Width="SizeToCells" MinWidth="50" MaxWidth="60"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPFARBE}" Header="颜色" Width="SizeToCells" MinWidth="30" MaxWidth="60"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPMEEH}" Header="单位" Width="SizeToCells" MinWidth="30" MaxWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPLIART}" Header="单卷分" Width="SizeToCells" MinWidth="30" MaxWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPLIART2}" Header="整批分" Width="SizeToCells" MinWidth="30" MaxWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=RESULT}" Header="整批评判" Width="SizeToCells" MinWidth="30" MaxWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=KDART}" Header="客户品种" Width="SizeToCells" MinWidth="30" MaxWidth="100"/>
                    <DataGridTextColumn Binding="{Binding Path=DES}" Header="规格" Width="SizeToCells" MinWidth="50" MaxWidth="100"/>
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM}" Header="总卷数" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=QTY}" Header="总数量" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=BROLLNUM}" Header="二等品卷数" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=BQTY}" Header="二等品总数" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=AVGRATE}" Header="平均分百平方码" Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=MINRATE}" Header="最小分百平方码" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=MAXRATE}" Header="最大分百平方码" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM1}" Header="0-10分百平方码卷数" Width="SizeToCells" MinWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY1}" Header="0-10分百平方码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM2}" Header="11-15分百平方码卷数" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY2}" Header="11-15分百平方码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM3}" Header="16-20分百平方码卷数" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY3}" Header="16-20分百平方码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM4}" Header="21-30分百平方码卷数" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY4}" Header="21-30分百平方码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM5}" Header="30分以上百平方码卷数" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY5}" Header="30分以上百平方码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=REFERANCE}" Header="参考标准" Width="SizeToCells" MinWidth="50" />
                </DataGrid.Columns>
            </DataGrid  >
        </Grid>
        <Grid Grid.Row="2" Grid.Column="0" Name="gWB18">
            <DataGrid CanUserReorderColumns="True"  
                  CanUserResizeRows="True" CanUserSortColumns="True" 
                  AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  FontSize="12"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10"
                               ItemsSource="{Binding}" x:Name="WB18" IsReadOnly="True"
                               Margin="0,5,0,0">
                <!--WBBEINDAT	ROLL	WBBSTKNR	MTR	YARD	WBBTAX	WBBDPART	
                    COL	HAND	SKEW	BOW	DQ	RATE	WIDTH	AVGWID	AQTY	BQTY	DEFECT -->
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=WBBEINDAT}" Header="检验日期" Width="SizeToCells" MinWidth="40" MaxWidth="70" />
                    <DataGridTextColumn Binding="{Binding Path=ROLL}" Header="小布卷" Width="SizeToCells" MinWidth="30"  MaxWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=WBBSTKNR}" Header="系统卷号" Width="SizeToCells" MinWidth="50"  MaxWidth="80"/>
                    <DataGridTextColumn Binding="{Binding Path=MTR}" Header="米数" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=YARD}" Header="码数" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=WBBTAX}" Header="LOT色" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=WBBDPART}" Header="格型" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=COL1}" Header="色差1" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=COL2}" Header="色差2" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=COL3}" Header="色差3" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=HAND}" Header="手感" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=SKEW}" Header="纬斜" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=BOW}" Header="纬弧" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=DQ}" Header="总扣分" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=RATE}" Header="扣分百平方码" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=WIDTH}" Header="幅宽" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=AQTY}" Header="判定" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=BQTY}" Header="二等品" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=DEFECT}" Header="疵点描述" Width="SizeToCells" MinWidth="50" />
                </DataGrid.Columns>
            </DataGrid  >
        </Grid>
        <Grid Grid.Row="1" Grid.Column="0" Name="gDg" Visibility="Collapsed">
            <DataGrid CanUserReorderColumns="True"  
                  CanUserResizeRows="True" CanUserSortColumns="True"
                  AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  FontSize="14"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               IsSynchronizedWithCurrentItem="True" Opacity="10"
                               ItemsSource="{Binding}" x:Name="Dg" IsReadOnly="True"
                               Margin="0,0,0,0">
                <!--VKPART	VKPFARBE	VKPMEEH	RATE	KDART	DES	MTR	YARD	ROLLNUM	QTY	BQTY	BROLLNUM	AVGRATE	
                 MINRATE	MAXRATE	ROLLNUM1	ROLLQTY1	ROLLNUM2	ROLLQTY2	ROLLNUM3	ROLLQTY3	
                    ROLLNUM4	ROLLQTY4	ROLLNUM5	ROLLQTY5 -->
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="花型号" Width="SizeToCells" MinWidth="50" MaxWidth="60"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPFARBE}" Header="颜色" Width="SizeToCells" MinWidth="30" MaxWidth="60"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPMEEH}" Header="单位" Width="SizeToCells" MinWidth="30" MaxWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPLIART}" Header="单卷分" Width="SizeToCells" MinWidth="30" MaxWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPLIART2}" Header="整批分" Width="SizeToCells" MinWidth="30" MaxWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=RESULT}" Header="整批评判" Width="SizeToCells" MinWidth="30" MaxWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=KDART}" Header="客户品种" Width="SizeToCells" MinWidth="30" MaxWidth="100"/>
                    <DataGridTextColumn Binding="{Binding Path=DES}" Header="规格" Width="SizeToCells" MinWidth="50" MaxWidth="100"/>
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM}" Header="总卷数" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=QTY}" Header="总数量" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=BROLLNUM}" Header="二等品卷数" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=BQTY}" Header="二等品总数" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=AVGRATE}" Header="平均分百码" Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=MINRATE}" Header="最小分百码" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=MAXRATE}" Header="最大分百码" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM1}" Header="0-10分百码卷数" Width="SizeToCells" MinWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY1}" Header="0-10分百码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM2}" Header="11-15分百码卷数" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY2}" Header="11-15分百码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM3}" Header="16-20分百码卷数" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY3}" Header="16-20分百码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM4}" Header="21-30分百码卷数" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY4}" Header="21-30分百码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLNUM5}" Header="30分以上百码卷数" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ROLLQTY5}" Header="30分以上百码数量" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=REFERANCE}" Header="参考标准" Width="SizeToCells" MinWidth="50" />
                </DataGrid.Columns>
            </DataGrid  >
        </Grid>
        <Grid Grid.Row="2" Grid.Column="0" Name="gWB"  Visibility="Collapsed">
            <DataGrid CanUserReorderColumns="True"  
                  CanUserResizeRows="True" CanUserSortColumns="True" 
                  AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  FontSize="12"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10"
                               ItemsSource="{Binding}" x:Name="WB" IsReadOnly="True"
                               Margin="0,5,0,0">
                <!--WBBEINDAT	ROLL	WBBSTKNR	MTR	YARD	WBBTAX	WBBDPART	
                    COL	HAND	SKEW	BOW	DQ	RATE	WIDTH	AVGWID	AQTY	BQTY	DEFECT -->
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=WBBEINDAT}" Header="检验日期" Width="SizeToCells" MinWidth="40" MaxWidth="60" />
                    <DataGridTextColumn Binding="{Binding Path=ROLL}" Header="小布卷" Width="SizeToCells" MinWidth="30"  MaxWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=WBBSTKNR}" Header="系统卷号" Width="SizeToCells" MinWidth="50"  MaxWidth="80"/>
                    <DataGridTextColumn Binding="{Binding Path=MTR}" Header="米数" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=YARD}" Header="码数" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=WBBTAX}" Header="LOT色" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=WBBDPART}" Header="格型" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=COL1}" Header="色差1" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=COL2}" Header="色差2" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=COL3}" Header="色差3" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=HAND}" Header="手感" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=SKEW}" Header="纬斜" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=BOW}" Header="纬弧" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=DQ}" Header="总扣分" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=RATE}" Header="扣分百码" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=WIDTH}" Header="幅宽" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=AQTY}" Header="判定" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=BQTY}" Header="二等品" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=DEFECT}" Header="疵点描述" Width="SizeToCells" MinWidth="50" />
                </DataGrid.Columns>
            </DataGrid  >
        </Grid>
    </Grid>
</local:DocumentBase>
